export default (initialState: API.UserInfo) => {
  // 在这里按照初始化数据定义项目中的权限，统一管理
  // 参考文档 https://umijs.org/docs/max/access
  const canSeeAdmin = !!(
    initialState && initialState.name !== 'dontHaveAccess'
  );
  // const { id, role } = initialState;
  return {
    canSeeAdmin,
    // canReadPageAuth: role === 'admin',
    // canReadPageApp2_1: role === 'admin',
    // canDeleteFoo: (foo:any) => {
    //   return foo.ownerId === id;
    // },
  };
};
